/**
 * Date Created: Mar 14, 2009
 */
package forteresce.portprofile.profiles.data;

import java.util.ArrayList;
import java.util.List;

import forteresce.portprofile.profiles.bean.GeneralBean;
import forteresce.portprofile.profiles.bean.ProfileBean;

/**
 * A class to store all the data from profile ini file
 * Please refer to http://kb.mozillazine.org/Profiles.ini_file
 * for how a firefox profile file looks like 
 * @author fortersce
 */
public class ProfileIniData {
    private GeneralBean general;
    private List<ProfileBean> profileBeanList;
    
    /**
     * @return the general
     */
    public GeneralBean getGeneral() {
        return general;
    }
    
    /**
     * @param general the general to set
     */
    public void setGeneral(GeneralBean general) {
        this.general = general;
    }
    
    /**
     * @return the profileBeans
     */
    public List<ProfileBean> getProfileBeanList() {
        return profileBeanList;
    }
    
    /**
     * @param profileBeans the profileBeans to set
     */
    public void setProfileBeanList(List<ProfileBean> profileBeanList) {
        this.profileBeanList = profileBeanList;
    }
    
    /**
     * Adds a new profile to the list
     * @param profileBean profile to add
     */
    public void addProfile(ProfileBean profileBean) {
        if(null == profileBeanList) {
            profileBeanList = new ArrayList<ProfileBean>();
        }
        profileBeanList.add(profileBean);
    }
}
